/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.eps.modelo.javabeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author luis
 */
@Entity
@Table(name = "T_Cliente")
@NamedQueries({
    @NamedQuery(name = "tCliente.findAll", query = "SELECT t FROM tCliente t"),
    @NamedQuery(name = "tCliente.findByNroInscripcion", query = "SELECT t FROM tCliente t WHERE t.nroInscripcion = :nroInscripcion"),
    @NamedQuery(name = "tCliente.findByDireccion", query = "SELECT t FROM tCliente t WHERE t.direccion = :direccion"),
    @NamedQuery(name = "tCliente.findByCodigoCatastral", query = "SELECT t FROM tCliente t WHERE t.codigoCatastral = :codigoCatastral"),
    @NamedQuery(name = "tCliente.findByNombres", query = "SELECT t FROM tCliente t WHERE t.nombres = :nombres"),
    @NamedQuery(name = "tCliente.findByApellidos", query = "SELECT t FROM tCliente t WHERE t.apellidos = :apellidos"),
    @NamedQuery(name = "tCliente.findByMedidor", query = "SELECT t FROM tCliente t WHERE t.medidor = :medidor"),
    @NamedQuery(name = "tCliente.findByTClienteID", query = "SELECT t FROM tCliente t WHERE t.tClienteID = :tClienteID")})
public class Cliente implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "nroInscripcion")
    private String nroInscripcion;
    @Basic(optional = false)
    @Column(name = "direccion")
    private String direccion;
    @Basic(optional = false)
    @Column(name = "codigoCatastral")
    private String codigoCatastral;
    @Basic(optional = false)
    @Column(name = "nombres")
    private String nombres;
    @Column(name = "apellidos")
    private String apellidos;
    @Column(name = "medidor")
    private String medidor;
    @Id
    @Basic(optional = false)
    @Column(name = "T_Cliente_ID")
    private Integer tClienteID;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tClienteID")
    private List<PadronLectura> padronLecturaList;

    public Cliente() {
    }

    public Cliente(Integer tClienteID) {
        this.tClienteID = tClienteID;
    }

    public Cliente(Integer tClienteID, String nroInscripcion, String direccion, String codigoCatastral, String nombres) {
        this.tClienteID = tClienteID;
        this.nroInscripcion = nroInscripcion;
        this.direccion = direccion;
        this.codigoCatastral = codigoCatastral;
        this.nombres = nombres;
    }

    public String getNroInscripcion() {
        return nroInscripcion;
    }

    public void setNroInscripcion(String nroInscripcion) {
        this.nroInscripcion = nroInscripcion;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public String getCodigoCatastral() {
        return codigoCatastral;
    }

    public void setCodigoCatastral(String codigoCatastral) {
        this.codigoCatastral = codigoCatastral;
    }

    public String getNombres() {
        return nombres;
    }

    public void setNombres(String nombres) {
        this.nombres = nombres;
    }

    public String getApellidos() {
        return apellidos;
    }

    public void setApellidos(String apellidos) {
        this.apellidos = apellidos;
    }

    public String getMedidor() {
        return medidor;
    }

    public void setMedidor(String medidor) {
        this.medidor = medidor;
    }

    public Integer getTClienteID() {
        return tClienteID;
    }

    public void setTClienteID(Integer tClienteID) {
        this.tClienteID = tClienteID;
    }

    public List<PadronLectura> getPadronLecturaList() {
        return padronLecturaList;
    }

    public void setPadronLecturaList(List<PadronLectura> padronLecturaList) {
        this.padronLecturaList = padronLecturaList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tClienteID != null ? tClienteID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cliente)) {
            return false;
        }
        Cliente other = (Cliente) object;
        if ((this.tClienteID == null && other.tClienteID != null) || (this.tClienteID != null && !this.tClienteID.equals(other.tClienteID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "murguia.ejb30.entity.COMER.tCliente[tClienteID=" + tClienteID + "]";
    }

}
